<% protocol ||= report_element.my_module.protocol %>
<% export_all = defined?(export_all) && export_all %>
<div class="report-element report-module-protocol-element">
  <div class="report-element-body">
    <h4 class="protocol-name">
      <% if protocol.name.present? %>
        <%= protocol.name %>
      <% else %>
        <%= t('projects.reports.elements.module.protocol.name') %>
      <% end %>
    </h4>
    <% unless @settings['exclude_timestamps'] %>
      <div class="user-time">
        <%= t('projects.reports.elements.module.protocol.user_time', code: protocol.original_code, timestamp: l(protocol.created_at, format: :full)) %>
      </div>
    <% end %>
    <div class="row module-protocol-description">
      <% if @settings.dig('task', 'protocol', 'description') && protocol.description.present? %>
        <%= custom_auto_link(protocol.prepare_for_report(:description, export_all: export_all),
                             team: current_team,
                             simple_format: false,
                             base64_encoded_imgs: true) %>
      <% end %>
    </div>
  </div>
</div>
